import { createRouter, createWebHistory } from "vue-router";

//静态导入
//import DemoView from 'views/Demo.vue'
//动态导入（懒加载
const DemoView = () => import('views/Demo.vue')


const routes = [
  {
    path: '/demo',
    name: 'demo',
    component: DemoView,
    meta: {
      title: 'demo页面',
    }

  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router;